package ${g.codePackage}.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
<%if (g.isSwagger) {%>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
<%}%>
<%if (g.isSuperEntity) {%>
import ${g.superEntityClassPackage};
<%}%>
<%if (g.isLombok) {%>
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
<%}%>
/**
* ${t.tableComment!}
* @author ${g.author}
* @since ${g.date}
*/
<%if (g.isLombok) {%>
@Data
@Accessors(chain = true)
<%}%>
<%if (g.isTableName) {%>
@TableName("${t.tableName}")
<%}%>
<%if (g.isSwagger) {%>
@ApiModel(value="${t.tableComment}", description="${t.tableComment}")
<%}%>
<%if (g.isSuperEntity) {%>
public class ${t.entityName} extends ${g.superEntityClassName}{
<%} else {%>
public class ${t.entityName} implements Serializable {
<%}%>
<%if (g.isSuperEntity) {%>
    private static final long serialVersionUID = 1L;
<%}%>

<%for(field in t.fields){%>
    /**
    * ${field.propertyContent}
    */
    <%if (field.isKey==1) {%>
        <%if (field.isKeyIdentityFlag) {%>
    @TableId(value = "${field.tableFieldName}", type = IdType.AUTO)
        <%}else if(!field.isKeyIdentityFlag){%>
    @TableId(value = "${field.tableFieldName}", type = IdType.${g.idType})
        <%} else {%>
    @TableId(value = "${field.tableFieldName}")
        <%}%>
    <%}%>
    <%if ( g.logicDeleteFieldName == field.propertyName ) {%>
    @TableLogic
    <%}%>
    <%if (g.isSwagger) {%>
    @ApiModelProperty(value = "${field.propertyContent}")
    <%}%>
    private ${field.propertyType} ${field.propertyName};

<%}%>

<%if (!g.isLombok) {%>
   <%for(field in t.fields){%>
    public ${field.propertyType} get${field.fieldPreFixName}() {
        return ${field.propertyName};
    }
    public void set${field.fieldPreFixName}(${field.propertyType} ${field.propertyName}) {
        this.${field.propertyName} = ${field.propertyName};
    }
    <%}%>
<%}%>

<%if (!g.isLombok) {%>
    @Override
    public String toString() {
    return "${t.entityName}{" +
    <%for(field in t.fields){%>
            ", ${field.propertyName}=" + ${field.propertyName} +
   <%}%>
    "}";
    }
<%}%>
}
